package com.superhelp.ebill.api;

import android.text.TextUtils;


import com.superhelp.ebill.api.param.Params;
import com.superhelp.ebill.util.CryptUtil;

import java.util.TreeMap;

/**
 * 请求参数
 * 
 *
 */
public class RepuestParam extends Params {

	private String page;
	private String pageSize;
	private String username;
	private String password;

	private String sgin;
	private String userId;

	private String token;
	private String key;

	private String version;

	private String phone;

	private String pwd;

	@Override
	public TreeMap<String, String> getParams() {
		params = simpleParams();

		if (null != version && !TextUtils.isEmpty(version)) {
			params.put("version", version);
		}
		if (null != token && !TextUtils.isEmpty(token)) {
			params.put("token", token);
		}
		if (null != username && !TextUtils.isEmpty(username)) {
			params.put("username", username);
		}
		if (null != password && !TextUtils.isEmpty(password)) {
			params.put("password", password);
		}
		if (null != page && !TextUtils.isEmpty(page)) {
			params.put("pageNum", page);
		}
		if (null != userId  && !TextUtils.isEmpty(userId )) {
			params.put("userId", userId );
		}
		if (null != pageSize && !TextUtils.isEmpty(pageSize)) {
			params.put("pageSize", pageSize);
		}

		if (null != key && !TextUtils.isEmpty(key)) {
			params.put("key", key);
		}

		if (null != phone && !TextUtils.isEmpty(phone)) {
			params.put("phone", phone);
		}

		if (null != pwd && !TextUtils.isEmpty(pwd)) {
			params.put("pwd", pwd);
		}
//		params.put("sign", CryptUtil.md5(convertParam()));
		return params;
	}

	public String getPage() {
		return page;
	}

	public void setPage(String page) {
		this.page = page;
	}

	public String getPageSize() {
		return pageSize;
	}

	public void setPageSize(String pageSize) {
		this.pageSize = pageSize;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getSgin() {
		return sgin;
	}

	public void setSgin(String sgin) {
		this.sgin = sgin;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getPwd() {
		return pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}
}
